<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Simple Map</title>
<link rel="stylesheet" href="http://192.168.20.117:8080/arcgis_js_v315_api/esri/css/esri.css" />
	
<style>
html,body,#ui-map-view {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
}
</style>
<script src="http://192.168.20.117:8080/arcgis_js_v315_api/init.js"></script>
	<script type="text/javascript">
	require(["esri/map",
	         "esri/layers/ArcGISDynamicMapServiceLayer",
	         "esri/geometry/Point",
	         "esri/dijit/LocateButton",
	         "dojo/domReady!"], 
	         function(Map, ArcGISDynamicMapServiceLayer, Point, LocateButton) {
		
		var map = new Map("mapDiv",{
			scale : 0,
			sliderOrientation : "horizontal",
			//center: [-117.72, 34.352],
			zoom: 13,
			logo : false
		});
		
		/* var geoLocate = new LocateButton({
			  map: map
		  }, "LocateButton");
		geoLocate.startup(); */
		
		var url  = "http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer";
		//"http://192.168.20.117:6080/arcgis/rest/services/SampleWorldCities/MapServer";
		//"http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineStreetWarm/MapServer";
		var layer = new ArcGISDynamicMapServiceLayer(url);
		
		map.addLayer(layer);
		//var mapPoint = new Point(-117.72, 34.352);
		//map.centerAndZoom(mapPoint, 11);//定位
		
		//console.log(map);
		console.log("map scale is "+map.getScale());
		
		//鼠标事件 SuperMap.Utility.getEvent(e);

		map.on("click", function(e) {
			console.log(this);
			//var infoTemplate = new esri.InfoTemplate("Attributes", "<tr>State Name: <td>${STATE_NAME} </tr></td><br><tr>Population:<td>${Pop2001}</tr></td>");
			//graphic.setInfoTemplate(infoTemplate);
		});
	});
	</script>
</head>

<body class="tundra">
	<div>
		<ul>
			<li>基于arcgis js api 3.15</li>
			<li> map data server address [http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer]</li>
		</ul>
	</div>
	<div id="mapDiv" style="width:100%; height:100%; border: 1px solid #000;">
		<!-- <div id="LocateButton"></div> -->
	</div>
</body>

</html>